home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
TRADNGX.TAS
< prev
next >
Wrap
Text File
|
1992-03-01
|
3KB
|
77 lines
{ Written by Jim Camenos, May 29, 1991, Prodigy code VNGH10A
looks at current trading range over past 50 days + volume for break-outs
.
.
* Modified 2/28/92 by Tom Rategan. Graphs price and volume. Price graph
tells close, high, % off high, avg daily hi-lo range, today's hi-lo range,
change today, and 30 day trading range. Volume graph shows today's
volume, avg volume (50MA), % today vs 50MA; prior 7MA, and prior 7MA
vs the 50MA. 7MA does not include today, rather it averages yesterday
through 8 days ago. Today's volume will always be high, and including
it in the 7MA would obscure the figure. Showing the prior 7MA tries to
show how the recent volume compares to the longer average. A large
high volume price move following a period of low volume and trading
range is especially significant.
Jim's original Trading.tas script looked for greater than 2
times average volume, I loosened that to 1.5 times average volume.
}
#max_quotes 265
{#OUTPUT_FILE 'TRADING.LST'}
if QUOTE_COUNT < 51 then RETURN; { Skip short stocks MM 6/5}
tx: array;
tx=TR();
gosub true_range;
if first_ticker then
begin
writeln(
'Hi-Lo range today > 2X average & Volume today > 1.5 times average.
');
writeln(
' Name Close Change AvgRg Today %OH %30Rg Vol %V'
);
writeln(
' ---- ----- ------ ----- ----- --- ----- --- --'
);
end;
if int(tr_sum)<>0 then goto wrtgrph else return;
:wrtgrph
writeln
(fullname,c[0],chg,avg_tr,tx[0],int(oh),'%',int(r30),'% ',v[0],int(v_v50),
'%');
opengraph(2);
sizegraph(4,2);
graph(1,' '+format(c[0],'$%5.2f')+' is '+format(oh,'%4.2f%')+' off '
+format(hivalqc[0],'$%5.2f')+' high. Change= '+format(chg,'$%2.2f')
+'. AvgRg= '+format(avg_tr,'$%1.2f')+', Today= '+format(tx[0],'$%2.2f')
+'. 30 Day Range= '+format(r30,'%2.2f%'));
graph(v,'Today='+format(v[0],'%5.f')+' 50MA='+format(v50[0],'%5.f')
+' %Today='+format(v_v50,'%4.f%')+' Prior 7MA='+format(v7,'%5.f')
+','+format(v7_v50,'%4.f%')+' of',v50,'50MA');
closegraph();
return;
:true_range
avg_tr = sum(tx,50)/50;
if tx[0] >= avg_tr*2 then goto chkvol else tr_sum = 0;
return;
:chkvol
v50 : array;
v50 = mov(v,50,'s');
if v[0] >= v50[0]*1.5 then goto stats else tr_sum = 0;
return;
:stats
tr_sum = 1;
hivalqc : array;
hi30 : array;
lo30 : array;
qc=(quote_count - 2);
hi30 = hhv(c,30);
lo30 = llv(c,30);
hivalqc = hhv(c,qc);
r30 = (1-(lo30/hi30))*100;
oh = 100-((c/hivalqc)*100);
v7 = ((v[-1]+v[-2]+v[-3]+v[-4]+v[-5]+v[-6]+v[-7])/7)
v_v50 = ((v[0]/v50[0])*100);
v7_v50 = ((v7/v50[0])*100);
chg = c[0] - c[-1];
return;